/** @type {import('next').NextConfig} */
const nextConfig = {
	async redirects() {
		return [
			{
				source: '/',
				destination: '/interplate/la', // 设置默认路由为 /home
				permanent: true, // 301 永久重定向
			},
		];
	},
	experimental: {
		typedRoutes: true,
	},
	basePath: '/zhan',
	serverRuntimeConfig:{
		
	},
	
	typescript: {
		ignoreBuildErrors: true,
	},
	async headers() {
		return [
			{
				source: '/:path*',
				headers: [
					{
						key: 'Cross-Origin-Opener-Policy',
						value: 'same-origin',
					},
					{
						key: 'Cross-Origin-Embedder-Policy',
						value: 'require-corp',
					},
					{
						key: 'Cache-Control',
						value: 'public, max-age=3600, must-revalidate', // 设置缓存策略
					},
				],
			},
		];
	},
	// async rewrites(){
	// 	return [
	// 		{
	// 			source: '/api/:path*',
	// 			destination: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX*',
	// 		},
	// 	]
	// },
};

export default nextConfig;
